<include file="Public:header" />
<div class="span-24 last">
    <include file="Public:menu" />
    <div class="span-19 last">
        <switch name="ACTION_NAME">
            <case value="add">
                <h4>添加用户</h4>
                <form name="memberform" method="post" action="__URL__/doadd">
                    <table border="1" cellspacing="1" >
                        <tr>
                            <th>用户名</th>
                            <td><input type="text" name="username" value=""  /></td>
                        </tr>
                        <tr>
                            <th>密码</th>
                            <td><input type="password" name="password" value=""  /></td>
                        </tr>
                        <tr>
                            <th>电子邮箱</th>
                            <td><input type="text" name="email" value=""  /></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <case value="edit">
                <h4>编辑用户</h4>
                <form name="memberform" method="post" action="__URL__/doedit">
                    <table border="0" cellspacing="1" >
                        <tr>
                            <th>ID</th>
                            <td>{$id}<input type="hidden" name="id" value="{$id}"></td>
                        </tr>
                        <tr>
                            <th>用户名</th>
                            <td>{$username}</td>
                        </tr>
                        <tr>
                            <th>新密码</th>
                            <td><input type="password" name="newpwd" value=""  /></td>
                        </tr>
                        <tr>
                            <th>电子邮箱</th>
                            <td><input type="text" name="email" value="{$email}"  /></td>
                        </tr>
                        <tr>
                            <th>创建时间</th>
                            <td>{$createtime|date="Y-n-j H:i:s",###}</td>
                        </tr>
                        <tr>
                            <th>最后登陆时间</th>
                            <td><if condition="$lastlogintime eq ''">暂无登陆记录<else />{$lastlogintime|date="Y-n-j H:i:s",###}</if></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <default />
            <include file="Public:searchbar" />
            <form name="memberform" method="post" action="__URL__/batch">
                <table width="100%" border="1" cellspacing="1" >
                    <tr>
                        <th width="20"><input name="checkbox" type="checkbox"  onClick="selAll(this)" /></th>
                        <th width="30">ID</th>
                        <th>用户名</th>
                        <th>Email</th>
                        <th>最后登陆</th>
                        <th width="150">操作</th>
                    </tr>
                    <volist name="user" id="u">
                        <tr>
                            <td><input name="id[]" type="checkbox" id="id[]" value="{$u.id}"  /></td>
                            <td>{$u.id}</td>
                            <td><a href="__URL__/edit/id/{$u.id}">{$u.username}</a></td>
                            <td><a href="__URL__/edit/id/{$u.id}">{$u.email}</a></td>
                            <td><if condition="$u.lastlogintime eq ''">暂无登陆记录<else />{$u.lastlogintime|date="Y-n-j H:i:s",###}</if></td>
                        <td><a href="__URL__/edit/id/{$u.id}">编辑</a> <a href="__URL__/batch/act/delete/id/{$u.id}">删除</a></td>
                        </tr>
                    </volist>

                </table>

                <input name="act" type="radio" value="delete" />删除
                <input type="submit" value="提交"  />

            </form>
            <include file="Public:paging" />
        </switch>
    </div>
    <div class="clear"></div>
</div>
<include file="Public:footer" />